#include "content.h"

#include <QApplication>
#include <QFont>
#include <QTranslator>
#include <QSplitter>
#include <QListWidget>


int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    QFont font("AR PL KaitiM GB",12);
    a.setFont(font);

    QTranslator translator;
    translator.load(":/combine_zh_CN.qm");
    a.installTranslator(&translator);

    QSplitter *splitterMain = new QSplitter(Qt::Horizontal, 0);
    splitterMain->setOpaqueResize(true);
    QListWidget *list = new QListWidget(splitterMain);
    list->insertItem(0,QObject::tr("Base Info"));
    list->insertItem(1,QObject::tr("Contact"));
    list->insertItem(2,QObject::tr("Detail"));

    content *cont=new content(splitterMain);
    QObject::connect(list, SIGNAL(currentRowChanged(int)), cont->stack, SLOT(setCurrentIndex(int)));

    splitterMain->setWindowTitle(QObject::tr("Change User Info"));
    splitterMain->setMinimumSize(splitterMain->minimumSize());
    splitterMain->setMaximumSize(splitterMain->maximumSize());
    splitterMain->show();

    return a.exec();
}
